class Car<T, K> {
	things: K[];
	constructor() {
		this.things = [];
	}
	add(something: K) {
		this.things.push(something);
	}
	get(index: number) {
		console.log(index);
	}
}

let car1 = new Car<number, string>();
car1.add('11');//如果使用number 11,就会报错
car1.get(2);